package com.lenovo.smarttraffic.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.view.ViewGroup;

import com.lenovo.smarttraffic.ui.fragment.LineChatFragment;

import java.util.List;

/**
 * on 2020-07-21
 * at 14:10
 *
 * @author Caleb.F
 * @Description
 */
public class FragmentAdapter  extends FragmentStatePagerAdapter {
    private List<LineChatFragment> mlist;

    public FragmentAdapter(FragmentManager fm, List<LineChatFragment> mlist) {
        super(fm);
        this.mlist = mlist;
    }

    public FragmentAdapter(FragmentManager fm) {
        super(fm);
    }


    @Override
    public Fragment getItem(int position) {
        return mlist.get(position);
    }

    @Override
    public int getCount() {
        return mlist.size();
    }

}
